//
//  CALayer+Shadow.m
//  BaseNormal
//
//  Created by uplooking on 2017/11/30.
//  Copyright © 2017年 RenLong. All rights reserved.
//

#import "CALayer+Shadow.h"

@implementation CALayer (Shadow)

- (void)addShadowInitWithColor:(UIColor *)color aplan:(CGFloat)aplan{
    
    self.shadowColor = color.CGColor;//shadowColor阴影颜色
    self.shadowOffset = CGSizeMake(4,4);//shadowOffset阴影偏移,x向右偏移4，y向下偏移4，默认(0, -3),这个跟shadowRadius配合使用
    self.shadowOpacity = aplan;//阴影透明度，默认0
    self.shadowRadius = 5;//阴影半径，默认3
    self.masksToBounds = NO;
    
}

- (void)addShadowInitWithColor:(UIColor *)color aplan:(CGFloat)aplan offex:(CGSize)offexSize{
    
    self.shadowColor = color.CGColor;//shadowColor阴影颜色
    self.shadowOffset = offexSize;//shadowOffset阴影偏移,x向右偏移4，y向下偏移4，默认(0, -3),这个跟shadowRadius配合使用
    self.shadowOpacity = aplan;//阴影透明度，默认0
    self.shadowRadius = 4;//阴影半径，默认3
    self.masksToBounds = NO;
    
}

@end
